function SrvArgument(params){ 
	 
}

SrvArgument.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new SrvArgument.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new SrvArgument.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new SrvArgument.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.saId=function(saId){if(this.proxy)return this.getProxy().saId(saId);  this.put("saId", saId);return this;};
	/** and sa_id is null */
	this.saIdNull=function(){if(this.proxy)return this.getProxy().saIdNull();if(this.get("saIdNot")==null)this.put("saIdNot", "");this.put("saId", null);return this;};
	/** not .... */
	this.saIdNot=function(){if(this.proxy)return this.getProxy().saIdNot();this.put("saIdNot", "not");return this;};
	this.saIdNotNull=function(){if(this.proxy)return this.getProxy().saIdNotNull();this.put("saIdNot", "not");this.put("saId", null);return this;};
	this.saIdNot=function(saId){if(this.proxy)return this.getProxy().saIdNot(saId);this.put("saIdNot", "not");this.put("saId", saId);return this;};
		
	/** and sa_id <= ? */
	this.saIdMin=function(min){if(this.proxy)return this.getProxy().saIdMin(min);this.put("saIdMin", min);return this;};
	/** and sa_id >= ? */
	this.saIdMax=function(max){if(this.proxy)return this.getProxy().saIdMax(max);this.put("saIdMax", max);return this;};
		
		
	this.saIdIn=function(ids){
		if(this.proxy)return this.getProxy().saIdIn(ids);  this.put("saIdIn", ids);return this;
	};	
		 
	
	
	/** 参数名称 [非空]       **/
	this.saName=function(saName){if(this.proxy)return this.getProxy().saName(saName);  this.put("saName", saName);return this;};
	/** and sa_name is null */
	this.saNameNull=function(){if(this.proxy)return this.getProxy().saNameNull();if(this.get("saNameNot")==null)this.put("saNameNot", "");this.put("saName", null);return this;};
	/** not .... */
	this.saNameNot=function(){if(this.proxy)return this.getProxy().saNameNot();this.put("saNameNot", "not");return this;};
	this.saNameNotNull=function(){if(this.proxy)return this.getProxy().saNameNotNull();this.put("saNameNot", "not");this.put("saName", null);return this;};
	this.saNameNot=function(saName){if(this.proxy)return this.getProxy().saNameNot(saName);this.put("saNameNot", "not");this.put("saName", saName);return this;};
		
		 
	
	
	/** 参数标识 [非空]       **/
	this.saFlag=function(saFlag){if(this.proxy)return this.getProxy().saFlag(saFlag);  this.put("saFlag", saFlag);return this;};
	/** and sa_flag is null */
	this.saFlagNull=function(){if(this.proxy)return this.getProxy().saFlagNull();if(this.get("saFlagNot")==null)this.put("saFlagNot", "");this.put("saFlag", null);return this;};
	/** not .... */
	this.saFlagNot=function(){if(this.proxy)return this.getProxy().saFlagNot();this.put("saFlagNot", "not");return this;};
	this.saFlagNotNull=function(){if(this.proxy)return this.getProxy().saFlagNotNull();this.put("saFlagNot", "not");this.put("saFlag", null);return this;};
	this.saFlagNot=function(saFlag){if(this.proxy)return this.getProxy().saFlagNot(saFlag);this.put("saFlagNot", "not");this.put("saFlag", saFlag);return this;};
		
		 
	
	
	/** 参数值 [非空]       **/
	this.saValue=function(saValue){if(this.proxy)return this.getProxy().saValue(saValue);  this.put("saValue", saValue);return this;};
	/** and sa_value is null */
	this.saValueNull=function(){if(this.proxy)return this.getProxy().saValueNull();if(this.get("saValueNot")==null)this.put("saValueNot", "");this.put("saValue", null);return this;};
	/** not .... */
	this.saValueNot=function(){if(this.proxy)return this.getProxy().saValueNot();this.put("saValueNot", "not");return this;};
	this.saValueNotNull=function(){if(this.proxy)return this.getProxy().saValueNotNull();this.put("saValueNot", "not");this.put("saValue", null);return this;};
	this.saValueNot=function(saValue){if(this.proxy)return this.getProxy().saValueNot(saValue);this.put("saValueNot", "not");this.put("saValue", saValue);return this;};
		
		 
	
	
	/** 参数描述        **/
	this.saDescribe=function(saDescribe){if(this.proxy)return this.getProxy().saDescribe(saDescribe);  this.put("saDescribe", saDescribe);return this;};
	/** and sa_describe is null */
	this.saDescribeNull=function(){if(this.proxy)return this.getProxy().saDescribeNull();if(this.get("saDescribeNot")==null)this.put("saDescribeNot", "");this.put("saDescribe", null);return this;};
	/** not .... */
	this.saDescribeNot=function(){if(this.proxy)return this.getProxy().saDescribeNot();this.put("saDescribeNot", "not");return this;};
	this.saDescribeNotNull=function(){if(this.proxy)return this.getProxy().saDescribeNotNull();this.put("saDescribeNot", "not");this.put("saDescribe", null);return this;};
	this.saDescribeNot=function(saDescribe){if(this.proxy)return this.getProxy().saDescribeNot(saDescribe);this.put("saDescribeNot", "not");this.put("saDescribe", saDescribe);return this;};
		
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有系统参数 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/configurator/argument.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取系统参数分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/configurator/argument.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取系统参数 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/configurator/argument.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

SrvArgument.get = function(id){
	var protocol = ux.ajax("/admin/configurator/argument.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.srvArgument;
	return null;
}

SrvArgument.where = new SrvArgument.Where(0,true);